package com.lee.lookup;

import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2022/1/5
 */
@Component
public abstract class LC {

    public void printLb() {
        System.out.println(createLb());
        System.out.println(createLb());

    }

    // 由于lb是个原型bean, 不能直接通过autowired注解注入, 通过lookup注解解决原型bean的注入问题.
    @Lookup
    public abstract LB createLb();
}
